Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iteration IMU Transformations AL Article #707

Merged
merged 5 commits into from
Sep 3, 2024

Conversation

marc-tonsen
Copy link
Contributor

No description provided.

@@ -57,11 +53,11 @@ def transform_imu_to_world(imu_coordinates, imu_quaternions):
])
```

Now that we have the `transform_imu_to_world` function, let's use it!
### Example: Heading Vectors in World Coordinates
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed all the applications of the methods we defined to examples with a ### header. This way in the ## sections we introduce the transformation function and in the ### sections we show how to use it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marc-tonsen Thanks!


To facilitate the comparison, it can be useful to represent these data streams in the same coordinate system. An important step is accounting for [the fixed 102 degree rotation offset between the scene camera and IMU coordinate systems](https://docs.pupil-labs.com/neon/data-collection/data-streams/#movement-imu-data), as depicted below.
The rotation is a 102 degree rotation around the x-axis of the IMU coordinate system and the translation is along the vector `(0.0 mm, -1.3 mm, -6.62 mm)`.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO the case including the translation is the default case and the application to 3D directions which should skip the translation is the special case. Introducing it like this makes the concept of "scene cam coords are not the same as IMU coords" easier to understand I think.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marc-tonsen Agreed!

return transform_scene_to_world(cart_gazes_in_scene, imu_quaternions)
```

## 2D Gaze to World Coordinates
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The result of this is identical to the results of the section above and it's not using the IMU data in a different way. It shows a different way of obtaining 3D gaze directions in cartesian coordinates, but in the context of this article I feel that's not relevant info. So IMO we should either drop this example or the one above because it's just introducing additional concepts that are not required to understand IMU transformations.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marc-tonsen I vote for removing 2D Gaze to World Coordinates, as we already perform the 2D to 3D gaze transformation automatically in Cloud, Neon Player, and pl-rec-export.

)
```

## World Spherical Coordinates
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This too is not related to IMU transformations. I'm not sure we'd want to cover the transformation between cartesian and spherical coordinates anywhere explicitly in our docs, as this is an algebra problem that's covered a lot on the internet and it is not required that often in eye tracking. Happy to discuss this though!

Copy link
Contributor

@rennis250 rennis250 Sep 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marc-tonsen In our case, I say we need it, because Neon's spherical coordinate conventions break with traditional spherical coordinate conventions in subtle ways. Considering the IMU seems to be a source of confusion for users, I would vote to make things as easy as possible for them. It's also been a request from two users so far.

@marc-tonsen marc-tonsen merged commit 35083cf into imu_alpha_labs Sep 3, 2024
7 of 8 checks passed
@marc-tonsen marc-tonsen deleted the imu_alpha_labs2 branch September 3, 2024 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants